package wnhz.com.business.shareshop.activity.mine;

import android.content.Intent;
import android.os.Build;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import wnhz.com.business.R;
import wnhz.com.business.base.BaseActivity;
import wnhz.com.business.base.MyBaseActivity;
import wnhz.com.business.groupshop.ui.PayActivity;
import wnhz.com.business.impl.ActionBarClickListener;
import wnhz.com.business.shareshop.ui.AddressActivityS;
import wnhz.com.business.shareshop.ui.PayActivityS;
import wnhz.com.business.view.TranslucentActionBar;

/**
 * 订单信息确认
 */

public class OrderMessageVerifyActivity extends BaseActivity implements ActionBarClickListener {
    @BindView(R.id.actionbar)
    TranslucentActionBar actionbar;
    @BindView(R.id.tv_makepay)
    TextView tvMakepay; //确认支付'
    @BindView(R.id.ll_address)
    LinearLayout ll_address; //地址选择


    public static Intent createIntent(MyBaseActivity activity) {
        Intent intent = new Intent(activity, OrderMessageVerifyActivity.class);
        return intent;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_order_message_verify);
        ButterKnife.bind(this);
        actionbar.setData("订单信息确认", R.drawable.ic_lefft_white, null, 0, null, 0, this);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            actionbar.setStatusBarHeight(getStatusBarHeight());
        }
    }

    @OnClick({R.id.tv_makepay,R.id.ll_address})
    public void initOnClick(View v) {
        switch (v.getId()) {
            case R.id.tv_makepay:
                startActivity(PayActivityS.createIntent(this, "", "", ""));
                break;
            case R.id.ll_address://地址选择
                startActivity(new Intent(OrderMessageVerifyActivity.this, AddressActivityS.class));
                break;
        }
    }

    @Override
    public void onLeftClick() {
        finish();
    }

    @Override
    public void onRightClick() {

    }

    @Override
    public void onEditTextClick() {

    }


}
